@extends('news.newslayout')

@section('style')

@stop

@section('title')
    信息新增
@stop

@section('content')
{{--@include('news.validate')--}}
<form class="form-horizontal" role="form" style="margin-top:50px;" method="post" action="{{--url('news/save')--}}">
@csrf
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">标题</label>
    <div class="col-sm-2">
      <input name="News[title]" value="{{old('News')['title']}}" type="text" class="form-control" id="firstname" placeholder="请输入标题">
    </div>
    @if(count($errors))
    <div class="col-sm-2  alert-danger">{{$errors->first('News.title')}}</div>
    @endif
  </div>
  <div class="form-group">
    <label for="lastname" class="col-sm-2 control-label">内容</label>
    <div class="col-sm-3">
      <textarea class="form-control"  rows="5" id="lastname" name="News[content]">{{old('News')['content']}}</textarea>
    </div>
    @if(count($errors))
    <div class="col-sm-2  alert-danger">{{$errors->first('News.content')}}</div>
    @endif
  </div>
  <div class="form-group">
    <label  class="col-sm-2 control-label">是否显示</label>
    <label class="radio-inline" style="margin-left: 10px;" >
        <input type="radio" name="News[is_show]" id="optionsRadios3" value="1" @if(old('News')['is_show']==1)checked @endif > 是
    </label>
    <label class="radio-inline">
        <input type="radio" name="News[is_show]" id="optionsRadios4"  value="0" @if(old('News')['is_show']==0)checked @endif > 否
    </label>
    @if(count($errors))
      <div style="float:right;margin-right:400px;" class="col-sm-2  alert-danger">{{$errors->first('News.is_show')}}</div>
    @endif

  </div>

  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-success  ">提交</button>
    </div>
  </div>
</form>
@stop

@section('js')

@stop